CREATE OR REPLACE TRIGGER T_REPORTSTATE 
BEFORE INSERT ON T_REPORTSTATEMENT 
REFERENCING OLD AS OLD NEW AS NEW 
FOR EACH ROW
DECLARE
v_seq_no number;

BEGIN
  select T_REPORTSTATEMENT_SEQ.nextval
  into v_seq_no
  from dual;
  
  :new.seq_no := v_seq_no;
  
END;
